package com.neouton.crm.prm.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.common.util.PageUtil;
import com.neouton.crm.prm.entity.ReturnedMoneyProgressVO;
import com.neouton.crm.prm.mapper.ReturnedMoneyProgressMapper;
import com.neouton.crm.prm.service.ReturnedMoneyProgressService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 回款进展表
 *
 * @author
 * @date 2022-12-02 17:03:47
 * @Version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ReturnedMoneyProgressServiceImpl implements ReturnedMoneyProgressService {
    @Resource
    private ReturnedMoneyProgressMapper returnedMoneyProgressMapper;

//    @Override
//    public PageUtil<ReturnedMoneyProgressVO> queryPage(IPage page, ReturnedMoneyProgressVO entity) {
//        IPage<ReturnedMoneyProgressVO> iPage = returnedMoneyProgressMapper.queryreturnedMoneyProgressPage(page, entity);
//        return new PageUtil(iPage);
//    }

    @Override
    public PageUtil<ReturnedMoneyProgressVO> queryPage(IPage page, ReturnedMoneyProgressVO entity) {
        return null;
    }

    @Override
    public void saveReturnedMoneyProgress(ReturnedMoneyProgressVO entity) {
        returnedMoneyProgressMapper.insert(entity);
    }

    @Override
    public void saveComments(List<ReturnedMoneyProgressVO> list) {
        returnedMoneyProgressMapper.saveComments(list);
    }

    @Override
    public void updateReturnedMoneyProgressById(ReturnedMoneyProgressVO entity) {
        returnedMoneyProgressMapper.updateByPrimaryKeySelective(entity);
    }

    @Override
    public int deletereturnedMoneyProgressById(Integer id) {
        return    returnedMoneyProgressMapper.deleteByPrimaryKey(Long.valueOf(id));
    }

    @Override
    public List<ReturnedMoneyProgressVO> getProgressInfo(Integer id) {
        return returnedMoneyProgressMapper.queryProgressInfo(id);
    }


}
